-
Notifications
You must be signed in to change notification settings - Fork 339
Rebase on #306 and additions #518
Rebase on #306 and additions #518
Conversation
f6d0e26
to
82a0eb6
Compare
Hmm tests are failing on travis not on my machine. Will investigate the issue. |
Ok I can reproduce the errors. I removed all node_modules and make a fresh |
ok now it's fixed. The difficult part to not throw error and instead using grunt.fail.warn which let user decide if they want to force or not the execution. IMO it's better to let user decide than crash the process. For the test I've stubbed Two test files are using this stub:
CC @sindresorhus for code review. |
@@ -255,6 +255,67 @@ useminPrepare: { | |||
|
|||
The given steps or post-processors may be specified as strings (for the default steps and post-processors), or as an object (for the user-defined ones). | |||
|
|||
### warnMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need an option for this?
@stephanebachelier: please rebase. |
@XhmikosR what's your position on the |
044f90c
to
a2b813e
Compare
FYI I've begin to play with defaulting |
Generally, I think there should be a warning when a source file is missing. Now, adding a separate option for that seems a little bit too much. |
@XhmikosR I will rework this PR to remove |
@XhmikosR if you want to review. I've updated the PR to remove the warnMissing option. By the way the original author added support for throwing an error if a resource is missing, a feature ask by lots of folks, thus I add to refactor the tests. |
@stephanebachelier: Why so many commits? And what's with the (foo) thingy? That just seems bloat... One last thing, I don't see as author @eli-collins anywhere. Anyway, regarding the PR itself, the changes are so many it needs a lot of time to carefully review. This should be split somehow so that it's smaller and easier to review, but if you are confident about the changes, your call. |
### resolveSource | ||
|
||
Type: 'function' | ||
Default: `nil` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nil
?
@XhmikosR the (foo) thingy convention is the one from AngularJS git commit convention that you can find in angularjs repo. The idea is to generate changelog and moreover recognize important commits. The original author of this PR is @eli-collins in #306. As I'm working on triaging and fixing issues To ease the code review and possible rebase, I've decided to not squash commits. The rebase of #306 was really painful. I know it's a huge PR but it's mainly two parts:
The second part was also painful because there was no cleaning of file system after each existing tests, which is not great. I'm quite confident with this PR. I've carefully reviewed it, add more tests but it will be great if someone is willing to review @eli-colins and my work. I might have missed something, and it might create some issues, but I'm active on the project as you can see. There are so many issues opened, and this PR will solve at least 3 annoying issues. As there is no more active maintainer on this project, see #313 and @sindresorhus comment, I've started to triage issues and fix them. There are lots of issues that I hope to fix by migrating from regexp to an html parser. Work is already on the go, and it will probably be a bigger PR. If you want to discuss about it, it might be better out of this issue :) |
8daf447
to
d65eea6
Compare
friend ping @XhmikosR could you review this PR ? |
Sorry it's pretty hard to review this :/ if tests pass I guess it's OK and
|
@XhmikosR This PR fix some issues so I think it's a good tradeoff and I could support any user complaining. |
Why do you keep the initial commits that include "Default: |
Ok, I just thought it might be harder to review with too many commits.. Good luck. |
d65eea6
to
b613a24
Compare
Document the fact that both usemin and useminPrepare now throw an error on resource not found
Use filesystem helper
b613a24
to
a7befbd
Compare
@XhmikosR @stevemao I've finally changed my mind and squash all the commits. It should be easier to review. @XhmikosR @stevemao If nobody wants to make a code review will you be ok if I create a /cc @sindresorhus I know you don't have time to work on this project anymore, but your opinion would help. |
Looks ok. |
Closing in favor of #535. |
This is a rebase of #306 with an addition that make useminPrepare and usemin to warn if no html is found.
This PR should then resolved #260, #404, #452.